package com.mowh.gof23.behavioral.patterns.observer;

/**
 * @author mowh1gd
 * @create 2023/10/26 9:29
 */
public class DigitObserver implements Observer{
    @Override
    public void update(NumberGenerator generator) {
        System.out.println("DigitObserver: " + generator.getNumber());
        try {
            Thread.sleep(100);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }
}
